/*
  Copyright 1996-2003
  Simon Whiteside

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

  $Id: ExecuteResult.java,v 1.7 2003/02/24 18:10:53 simkin_cvs Exp $
*/
package simkin;

/**
 * This class is used by the {@link simkin.Interpreter Interpreter} to return the result of an execute() method.
 * <p>The class contains the result of the method, along with the method's parse-tree, which can be cached for
 * swifter execution next time.
 */
public class ExecuteResult {
    Object m_Result;
    ParseNode m_ParseTree=null;
    ExecuteResult(Object result,ParseNode parseTree){
	m_Result=result;
	m_ParseTree=parseTree;
    }
    /**
     * Returns the method call result
     * @return the result of the method call, as an Object
     */
    public Object getResult(){
	return m_Result;
    }
    /**
     * Returns the parse tree for the method, which can be cached and passed to a faster execute() method
     * @return the parse tree for the method, which can be cached and passed to a faster execute() method
     */
    public ParseNode getParseTree(){
	return m_ParseTree;
    }
}
